package com.yangchuang.openpicture.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yangchuang.openpicture.pojo.UserFavoriteFolder;

import java.util.List;

public interface UserFavoriteFolderService extends IService<UserFavoriteFolder> {

    /**
     * 创建收藏夹
     *
     * @param userId 用户ID
     * @param name   收藏夹名称
     * @return 创建的收藏夹
     */
    UserFavoriteFolder createFolder(Long userId, String name);

    /**
     * 获取用户的所有收藏夹
     *
     * @param userId 用户ID
     * @return 收藏夹列表
     */
    List<UserFavoriteFolder> getUserFolders(Long userId);

    /**
     * 删除收藏夹
     *
     * @param userId   用户ID
     * @param folderId 收藏夹ID
     * @return 是否删除成功
     */
    void deleteFolder(Long userId, Long folderId);


    String getFolderNameById(Long folderId);

    Long getFolderIdByUserIdAndFolderName(String folderName, Long userId);

    Long getFolderIdByUserIdAndFolderName(Long folderId, Long userId);

    String FolderNameAndIdUpdate(Long folderId);
}
